<script setup lang="ts">
const {apiBase,imgBase}=useRuntimeConfig().public;
const props=defineProps<{src:string,list:string[],index?:number}>()
const src=computed(()=>`${imgBase}/${props.src}`)
const list=computed(()=>props.list.map((item:string)=>`${imgBase}/${item}`))
</script>

<template>
  <el-image
      style="width: 100px; height: 100px"
      :src="src"
      :zoom-rate="1.2"
      :max-scale="7"
      :min-scale="0.2"
      :preview-src-list="list"
      :initial-index="props.index??0"
      :z-index="9999"
      fit="cover"
      :preview-teleported="true"
      :hide-on-click-modal="true"
  />
</template>

<style scoped lang="scss">

</style>